package com.softline.documentsmall.controller;

import com.softline.documentsmall.entity.Collection;
import com.softline.documentsmall.entity.DictionaryShare;
import com.softline.documentsmall.ret.ReturnVO;
import com.softline.documentsmall.ret.ReturnVOUtils;
import com.softline.documentsmall.service.DictionaryShareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: documentsmall
 * @description:
 * @author: wmj
 * @create: 2020-12-10
 * @ClassName: DictionaryShareController
 */

@Api(value="分享相关相关接口",tags={"分享相关相关接口"})
@RestController
@RequestMapping("/dictionary/share")
@CrossOrigin(allowCredentials = "true",allowedHeaders = "*")
public class DictionaryShareController {

    @Autowired
    DictionaryShareService dictionaryShareService;

    @ApiOperation(value="分享", notes = "分享")
    @PostMapping(value = "/add")
    public ReturnVO add(@RequestBody DictionaryShare dictionaryShare){
        dictionaryShareService.add(dictionaryShare);
        return ReturnVOUtils.success("分享成功");
    }

}
